import QtQuick
import QtQuick.Controls
import qml_menu_style
import "." as Components

MenuItem {
    id: baseMenuItem
    height: MenuTheme.menuItemHeight
    
    // 菜单项边框
    background: Rectangle {
        implicitHeight: MenuTheme.menuItemHeight
        color: baseMenuItem.highlighted ? MenuTheme.colors.highlightColor : "transparent"
        radius: MenuTheme.radius
    }

    // 菜单项文字
    contentItem: Text {
        text: baseMenuItem.text
        font.pixelSize: MenuTheme.fontSize
        color: baseMenuItem.highlighted ? MenuTheme.colors.highlightedText :
                (baseMenuItem.enabled ? MenuTheme.colors.textColor : MenuTheme.colors.disabledTextColor)
        verticalAlignment: Text.AlignVCenter
        leftPadding: MenuTheme.leftPadding
        rightPadding: MenuTheme.leftPadding
        elide: Text.ElideRight
    }
} 
